/*
 * ConnectButton.java
 * 
 * Created on 16.9.2007, 19:46:34
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.possoft.client.gui.panel.nastavenispodnipanel.components;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;

import cz.possoft.client.gui.panel.nastavenispodnipanel.panel.NastaveniShowPanel;

/**
 *
 * @author mara
 */
public class ConnectButton extends JButton {    
    
    
    // listener je spusten pri stisku tlacitka pripojit.
    private class ConnectionListener implements ActionListener {
     
        // spojeni se serverem
        public void actionPerformed(ActionEvent event) {                    
            
            // spusteni pripojeni k serveru pokud nejsme pripojeni.
            NastaveniShowPanel.startConnectThread();
        }
    }
    
    
    public ConnectButton(String text) {
        super(text);        
        addActionListener(new ConnectionListener());
    }

}
